<ul class="nav nav-tabs mb-4">
    <li class="nav-item">
        <a class="nav-link {% if 'summary' == active %}active {{ theme_tab_active }}{% else %}{{ theme_tab }}{% endif %}" href="{{ path('slm_read', {'name': policy.name}) }}">{{ 'summary'|trans }}</a>
    </li>

    {% if is_granted('SLM_POLICY_UPDATE', policy) %}
        <li class="nav-item">
            <a class="nav-link {% if 'update' == active %}active {{ theme_tab_active }}{% else %}{{ theme_tab }}{% endif %}" href="{{ path('slm_update', {'name': policy.name}) }}">{{ 'update'|trans }}</a>
        </li>
    {% endif %}

    {% if policy.lastSuccess or policy.lastFailure %}
        <li class="nav-item">
            <a class="nav-link {% if 'history' == active %}active {{ theme_tab_active }}{% else %}{{ theme_tab }}{% endif %}" href="{{ path('slm_read_history', {'name': policy.name}) }}">{{ 'history'|trans }}</a>
        </li>

        <li class="nav-item">
            <a class="nav-link {% if 'stats' == active %}active {{ theme_tab_active }}{% else %}{{ theme_tab }}{% endif %}" href="{{ path('slm_read_stats', {'name': policy.name}) }}">{{ 'stats'|trans }}</a>
        </li>
    {% endif %}
</ul>
